package controller;

import domain.Account;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/param")
public class paramController {
    @RequestMapping("/testParam")
    public String testParam(String username,String password){
        System.out.println("执行完毕");
        System.out.println("用户名"+username);
        System.out.println("密码"+password);
        return "success";
    }
    @RequestMapping("/saveAccount")//把数据封装到javaBean的类当中
    public String saveAccount(Account account){//表单会全部默认封装到account对象中
        System.out.println("执行完毕");
        System.out.println(account);
        return "success";
    }
}
